<?php
/**
 * Created by PhpStorm.
 * User: dwlw
 * Date: 2018/5/3
 * Time: 15:34
 */
namespace app\admin\http\middleware;


class Login{
    public function handle($request, \Closure $next)
    {
        $where['user_name'] = $request->param('username');
        $where['pass_word'] = $request->param('password');
//        $res = DB::table('d_user')->where($where)->find();
        if ($res){
            return redirect('index');
        }
        return $next($request);
    }
}